<!-- DOWNLOADED FROM WWW.SCRIPTGATES.COM -->
<!DOCTYPE html>
<html>
    <head>
        <?php $this->load->view('js-css-view') ?>
        <script type="text/javascript" src="<?php echo base_url() ?>assets/dashboard/js/jquery.isotope.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url() ?>assets/dashboard/js/jquery.colorbox-min.js"></script>

<script type="text/javascript">
    jQuery(document).ready(function(){
        // dynamic table
        jQuery('#dyntable').dataTable({
            "sPaginationType": "full_numbers",
            "aaSortingFixed": [[0,'asc']],
            "fnDrawCallback": function(oSettings) {
                jQuery.uniform.update();
            }
        });
        
        jQuery('#dp1').datepicker({
				format: 'mm-dd-yyyy'
			});   
    });
</script>

    </head>

    <body>
        <div class="mainwrapper">    
            <div class="header">
                <?php $this->load->view('header-view'); ?>
            </div>    
            <div class="leftpanel">
                <?php $this->load->view('menu-view'); ?>
            </div><!-- leftpanel -->

            <div class="rightpanel">        
                <ul class="breadcrumbs">
                    <li><a href="<?php echo base_url() ?><?php echo $link; ?>"><i class="iconfa-file"></i></a> <span class="separator"></span></li>
                    <li><?php echo $current; ?></li>            
                </ul>

                <div class="pageheader">            
                    <div class="pageicon"><span class="iconfa-file"></span></div>
                    <div class="pagetitle">                
                        <h1><?php echo $current; ?></h1>
                    </div>
                </div><!--pageheader-->

                <div class="maincontent">
                    <div class="maincontentinner">
                        <div class="row-fluid">  
                            <div id="dashboard-left" class="span12">
                               
                                   <div class="right" style="text-align: right"> <a href="<?php echo base_url() ?>user/add" class="btn btn-primary">Tambah Data User</a></div>  
                
                                
                                <h4 class="widgettitle"> User's Data</h4>

                                 <table id="dyntable" class="table table-bordered">
                    <colgroup>
                        <col class="con0" style="align: center; width: 4%" />
                        <col class="con1" />
                        <col class="con0" />
                        <col class="con1" />
                        <col class="con1" />
                        <col class="con0" />
                        <col class="con1" />
                    </colgroup>
                    <thead>
                        <tr>
                            <th class="head0 center">#</th>
                            <th class="head0 center">No</th>
                            <th class="head1">Username</th>
                            <th class="head1">Email</th>
                            <th class="head1">Role</th>
                            <th class="head0 center">Action</th>
                        </tr>
                    </thead>
                    <tbody>
                      
                      <?php 
                      $no = 1;
                      foreach($users as $row) { ?>  
                        <tr class="gradeX">
                          <td class="aligncenter"></td>                        
                          <td class="aligncenter"><span class="center">
                            <?php echo $no  ?>
                          </span></td>
                            <td><?php echo $row['username']  ?></td>
                            <td><?php echo $row['email']  ?></td>
                            <td><?php echo $row['role']  ?></td>
                            <td class="center">
                                <a class="btn btn-info alertinfo" href="<?php echo base_url() ?>user/view/<?php echo $row['username'] ?>"><small>View</small></a> &nbsp; &nbsp;
                             <!--   <a class="btn btn-danger alertdanger" href="<?php echo base_url() ?>dashboard/user/processDelete/<?php echo $row['username'] ?>" onclick="return confirm('Anda Yakin Akan Menghapus?')"><small>Delete</small></a> --> 
                            </td>
                        </tr>
                      <?php $no++; } ?>
                        
                    </tbody>
                </table>


                            </div>
                        </div>

                        <div class="footer">
<?php $this->load->view('footer-view'); ?>
                        </div><!--footer-->

                    </div><!--maincontentinner-->
                </div><!--maincontent-->

            </div><!--rightpanel-->

        </div><!--mainwrapper-->

    </body>
</html>